<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class CarModelObjectInfo extends Model
{

    /**
     * 关联到模型的数据表
     *
     * @var string
     */
    protected $table = 'car_model_object_info';

    public static function setOilId( $mi_key, $oil_id ){

        $sql = "update car_model_object_info set 
                oil_id=? where mi_key='".$mi_key."'";
        $res = DB::update( $sql,[ $oil_id ] );
        return $res;
    }
}